﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;
using Model;
namespace DAL
{
   public class 修改操作DAL
    {
       public static object Xuigai()
       {
           string sql = "select COUNT(*) from Admins where UserID = @UserID and UserCompellation = @UserCompellation";
           List<SqlParameter> list = new List<SqlParameter>()
            {
                new SqlParameter("@UserID",Admins.UserID),
                new SqlParameter("@UserCompellation",Admins.UserCompellation)
            };
           return DBHelper.Chadanzhi(sql, list.ToArray());
       }
       public static int XuigaiPwd() {

           string sql = "Update Admins set UserPwd=@UserPwd where UserID=@UserID";
           List<SqlParameter> list = new List<SqlParameter>()
            {
                 new SqlParameter("@UserPwd",Admins.UserPwd),
                new SqlParameter("@UserID",Admins.UserID)
              
            };
           return DBHelper.Update(sql,list.ToArray());
       }
    }
}
